#!/bin/bash

echo "Enter a string: "
## Read the input string from the user input
read input_string

## 连续字符进行压缩 -s == sequeeze
echo "Si! The output is: " $input_string | tr -s 'o'

str="hola amigo adios   guten tag     bonjour merci"
## replace the consecutive space with newline character
echo $str | tr -s ' ' '\n'